package com.xoa.service.workflow.flowtype;

import com.xoa.model.users.Users;
import com.xoa.model.workflow.FlowRun;
import com.xoa.model.workflow.FlowRunLog;
import com.xoa.util.ToJson;
import com.xoa.util.common.wrapper.BaseWrappers;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

public interface FlowRunService {
	@Transactional(readOnly=true)
	public int getMaxRunId();
	/**
	 * 创建作者:   张龙飞
	 * 创建日期:   2017/6/1 16:59
	 * 方法介绍:   保存流程实例信息
	 * 参数说明:
	 */
	public void save(FlowRun flowRun);

	public FlowRun find(Integer runId);

	public int update(FlowRun flowRun);

	public int updateTime(Map<String,Object> map);

	public int updateAttachment(Map<String,Object> map);

	BaseWrappers queryFlowRun(Integer state, Integer runId, Integer flowId, String runName, String beginDate, String endDate, String workLevel, String status, String userId,
							  Integer page, Integer pageSize, boolean useFlag, Users users, String output, HttpServletResponse response, HttpServletRequest request);

	public int updateFocusUser(Map<String,Object> map);

	public int updateEnd(Map<String,Object> map);

	BaseWrappers queryFlowRunCount(HttpServletRequest request);

	 ToJson<FlowRunLog> selFlowRunLog(Integer page,Integer pageSize,boolean useFlag,String starTime,String endTime,String runId,String flowName,String jobsName,String type,String ProcessingPerson,String ip);

	 public ToJson<FlowRunLog> delFlowRunLog(Integer logId);
	 }
